GtkCssProvider: Do not miss the last class name in concatenated classes.
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 8 Nov 2010 01:51:53 +0000 (02:51 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:45 +0000 (15:38 +0100)
Selectors like .menu.check or .entry.progressbar were being misparsed
and attributed to .menu and .entry.

gtk/gtkcssprovider.c

index eaf850b944189b85051400a8ae270d9108193f39..d97435b71f85b56b5a8ac56ea3034c0ee34f850f 100644 (file)
@@ -1363,6 +1363,7 @@ parse_classes (SelectorPath   *path,
 
   if ((pos = strchr (str, '.')) != NULL)
     {
+      /* Leave the last class to the call after the loop */
       while (pos)
         {
           *pos = '\0';
@@ -1372,8 +1373,8 @@ parse_classes (SelectorPath   *path,
           pos = strchr (str, '.');
         }
     }
-  else
-    selector_path_prepend_class (path, str);
+
+  selector_path_prepend_class (path, str);
 }
 
 static GTokenType